'''
Created on 23/03/2009

@author: eh01
'''
from im.ds.dst import DST
import unittest


class Test(unittest.TestCase):


    def setUp(self):
        pass


    def tearDown(self):
        pass


    def test_to_xml(self):
        dst = DST(subject = "testSubject", predicate = "testPredicate", object = "testObject")
        print dst.to_xml()

    def test_unmarshal(self):
        xml = "<dst>"
        subject = "testSubject"
        predicate = "testPredicate"
        object = "testObject"
        xml += "<subject>" + subject + "</subject>"
        xml += "<predicate>" + predicate + "</predicate>"
        xml += "<object>" + object + "</object>"
        xml += "</dst>"
        dst = DST(xml_string = xml)
        assert subject == dst.get_subject()
        assert predicate == dst.get_predicate()
        assert object == dst.get_object()
        
if __name__ == "__main__":
    #import sys;sys.argv = ['', 'Test.testToXML']
    unittest.main()